<html><head><title>Game2D module: cross-platform (win32, linux) 2d game engine. reference</title>
<link rel=stylesheet Type=text/css href='../../../../doc/bmxstyle.css'>
</head><body>
<table width=100% cellspacing=0><tr align=center><td class=small>&nbsp;</td>
<td class=small width=1%><b>wdw.game2d:</b></td>
<td class=small width=1%><a href=#types class=small>Types</a></td>
<td class=small width=1%><a href=#modinfo class=small>Modinfo</a></td>
<td class=small width=1%><a href='../../../../mod/wdw.mod/game2d.mod/game2d.bmx' class=small>Source</a></td>
<td class=small>&nbsp;</td></tr></table>
<h1>Game2D module: cross-platform (win32, linux) 2d game engine.</h1>
<h2><a name=types></a>Types Summary</h2><table class=doc width=100%>
<tr><td class=docleft width=1%><a href=#TBag>TBag</a></td><td class=docright>
An unsorted collection type, using array for speed.
</td></tr>
<tr><td class=docleft width=1%><a href=#TColor>TColor</a></td><td class=docright>
Convenience type for color and alpha.
</td></tr>
<tr><td class=docleft width=1%><a href=#TEntity>TEntity</a></td><td class=docright>
Game entity. Documented methods are exposed to Lua.
</td></tr>
<tr><td class=docleft width=1%><a href=#TFixedTime>TFixedTime</a></td><td class=docright>
Fixed time step and render tweening.
</td></tr>
<tr><td class=docleft width=1%><a href=#TGame>TGame</a></td><td class=docright>
State based game.
</td></tr>
<tr><td class=docleft width=1%><a href=#TLua>TLua</a></td><td class=docright>
Game2d interface for Lua scripts.
</td></tr>
<tr><td class=docleft width=1%><a href=#TPosition>TPosition</a></td><td class=docright>
Entity position type.
</td></tr>
<tr><td class=docleft width=1%><a href=#TRect>TRect</a></td><td class=docright>
2D rectangle.
</td></tr>
<tr><td class=docleft width=1%><a href=#TRenderState>TRenderState</a></td><td class=docright>
Render state push to and pop from a stack.
</td></tr>
<tr><td class=docleft width=1%><a href=#TResources>TResources</a></td><td class=docright>
Manages resources.
</td></tr>
<tr><td class=docleft width=1%><a href=#TState>TState</a></td><td class=docright>
A game2d state.
</td></tr>
<tr><td class=docleft width=1%><a href=#TTransition>TTransition</a></td><td class=docright>
Game state transition.
</td></tr>
<tr><td class=docleft width=1%><a href=#TTransitionEmpty>TTransitionEmpty</a></td><td class=docright>
An empty gamestate transition.
</td></tr>
<tr><td class=docleft width=1%><a href=#TTransitionFadeIn>TTransitionFadeIn</a></td><td class=docright>
A fade-in effect.
</td></tr>
<tr><td class=docleft width=1%><a href=#TTransitionFadeOut>TTransitionFadeOut</a></td><td class=docright>
A slow fade-out effect.
</td></tr>
<tr><td class=docleft width=1%><a href=#TVector2D>TVector2D</a></td><td class=docright>
A 2d vector class.
</td></tr>
</table>
<h2
 id=typesdet>Types
</h2>
<table class=doc width=100% cellspacing=3 id=TBag>
<tr><td class=doctop colspan=2>Type TBag</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>An unsorted collection type, using array for speed.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Contains objects which can be retrieved by index	.</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TBag_methods></a>Methods Summary</th></tr>
<tr><td class=docleft width=1%><a href=#Add>Add</a></td><td class=docright>
Adds specified element to end of this bag.
</td></tr>
<tr><td class=docleft width=1%><a href=#AddAllFrom>AddAllFrom</a></td><td class=docright>
Adds all items from specified bag into this bag.
</td></tr>
<tr><td class=docleft width=1%><a href=#Clear>Clear</a></td><td class=docright>
Removes all elements from this bag.
</td></tr>
<tr><td class=docleft width=1%><a href=#Contains>Contains</a></td><td class=docright>
Returns true if specified element is in the bag.
</td></tr>
<tr><td class=docleft width=1%><a href=#Get>Get</a></td><td class=docright>
Returns the element at the specified index.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetCapacity>GetCapacity</a></td><td class=docright>
Returns the number of element slots in the bag.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetSize>GetSize</a></td><td class=docright>
Returns the number of elements in the bag.
</td></tr>
<tr><td class=docleft width=1%><a href=#Grow>Grow</a></td><td class=docright>
Grows bag array capacity.
</td></tr>
<tr><td class=docleft width=1%><a href=#IsEmpty>IsEmpty</a></td><td class=docright>
Returns true if the bag contains no elements.
</td></tr>
<tr><td class=docleft width=1%><a href=#Remove>Remove</a></td><td class=docright>
Removes the first occurance of the specified element.
</td></tr>
<tr><td class=docleft width=1%><a href=#RemoveAllFrom>RemoveAllFrom</a></td><td class=docright>
Removes from this bag all of its elements that are contained in the specified bag.
</td></tr>
<tr><td class=docleft width=1%><a href=#RemoveByIndex>RemoveByIndex</a></td><td class=docright>
Removes the element at the specified position.
</td></tr>
<tr><td class=docleft width=1%><a href=#RemoveLast>RemoveLast</a></td><td class=docright>
Removes and returns the last item in the bag.
</td></tr>
<tr><td class=docleft width=1%><a href=#Set>Set</a></td><td class=docright>
Set element at specified index in the bag.
</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Add>
<tr><td class=doctop colspan=2>Method Add(o:Object)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Adds specified element to end of this bag.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>If needed also increases the capacity of the bag.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=AddAllFrom>
<tr><td class=doctop colspan=2>Method AddAllFrom(b2:TBag)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Adds all items from specified bag into this bag.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Clear>
<tr><td class=doctop colspan=2>Method Clear()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Removes all elements from this bag.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Contains>
<tr><td class=doctop colspan=2>Method Contains:Int(o:Object)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns true if specified element is in the bag.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Only finds the first occurance.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Get>
<tr><td class=doctop colspan=2>Method Get:Object(index:Int)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns the element at the specified index.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetCapacity>
<tr><td class=doctop colspan=2>Method GetCapacity:Int()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns the number of element slots in the bag.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetSize>
<tr><td class=doctop colspan=2>Method GetSize:Int()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns the number of elements in the bag.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Grow>
<tr><td class=doctop colspan=2>Method Grow(newSize:Int = 0 )</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Grows bag array capacity.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Each grow step is bigger than the previous as more growth calls = more need for more space.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=IsEmpty>
<tr><td class=doctop colspan=2>Method IsEmpty:Int()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns true if the bag contains no elements.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Remove>
<tr><td class=doctop colspan=2>Method Remove:Int(o:Object)</td></tr>
<tr><td class=docleft width=1%>Returns</td><td class=docright>True if remove succeeded.</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Removes the first occurance of the specified element.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=RemoveAllFrom>
<tr><td class=doctop colspan=2>Method RemoveAllFrom:Int(b2:TBag)</td></tr>
<tr><td class=docleft width=1%>Returns</td><td class=docright>True if contents of this bag are changed.</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Removes from this bag all of its elements that are contained in the specified bag.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=RemoveByIndex>
<tr><td class=doctop colspan=2>Method RemoveByIndex:Object(index:Int)</td></tr>
<tr><td class=docleft width=1%>Returns</td><td class=docright>The removed object.</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Removes the element at the specified position.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=RemoveLast>
<tr><td class=doctop colspan=2>Method RemoveLast:Object()</td></tr>
<tr><td class=docleft width=1%>Returns</td><td class=docright>Removed object or null.</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Removes and returns the last item in the bag.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Set>
<tr><td class=doctop colspan=2>Method Set(index:Int, o:Object)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Set element at specified index in the bag.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Sizes bag if needed.</td></tr>
</table>
<br>
<table class=doc width=100% cellspacing=3 id=TColor>
<tr><td class=doctop colspan=2>Type TColor {expose hidefields}</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Convenience type for color and alpha.</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TColor_methods></a>Methods Summary</th></tr>
<tr><td class=docleft width=1%><a href=#GetAlpha>GetAlpha</a></td><td class=docright>
Returns alpha value.
</td></tr>
<tr><td class=docleft width=1%><a href=#Set>Set</a></td><td class=docright>
Sets color and alpha values.
</td></tr>
<tr><td class=docleft width=1%><a href=#SetAlpha>SetAlpha</a></td><td class=docright>
Sets alpha value.
</td></tr>
<tr><td class=docleft width=1%><a href=#Use>Use</a></td><td class=docright>
Uses color and alpha on current graphics instance.
</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TColor_functions></a>Functions Summary</th></tr>
<tr><td class=docleft width=1%><a href=#Create>Create</a></td><td class=docright>
Constructor.
</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetAlpha>
<tr><td class=doctop colspan=2>Method GetAlpha:Float()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns alpha value.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Set>
<tr><td class=doctop colspan=2>Method Set(r:Int, g:Int, b:Int, a:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets color and alpha values.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SetAlpha>
<tr><td class=doctop colspan=2>Method SetAlpha(a:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets alpha value.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Use>
<tr><td class=doctop colspan=2>Method Use()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Uses color and alpha on current graphics instance.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Create>
<tr><td class=doctop colspan=2>Function Create:TColor(r:Float = 255, g:Float = 255, b:Float = 255, a:Float = 1.0)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Constructor.</td></tr>
</table>
<br>
<table class=doc width=100% cellspacing=3 id=TEntity>
<tr><td class=doctop colspan=2>Type TEntity {expose hidefields}</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Game entity. Documented methods are exposed to Lua.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>An entity is added to the game by calling Game.AddEntity().
Entity logic can be placed in the lua function Update(entity), rendering is handled by Game2D.</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TEntity_methods></a>Methods Summary</th></tr>
<tr><td class=docleft width=1%><a href=#Collide>Collide</a></td><td class=docright>
Returns true if images of entities collide.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetId>GetId</a></td><td class=docright>
Returns entity id.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetImage>GetImage</a></td><td class=docright>
Returns the entity image.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetPosition>GetPosition</a></td><td class=docright>
Returns the position type for this entity.
</td></tr>
<tr><td class=docleft width=1%><a href=#Init>Init</a></td><td class=docright>
Initializes entity basic settings.
</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Collide>
<tr><td class=doctop colspan=2>Method Collide:Int(e:TEntity) {bool}</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns true if images of entities collide.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetId>
<tr><td class=doctop colspan=2>Method GetId:String()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns entity id.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetImage>
<tr><td class=doctop colspan=2>Method GetImage:TImage()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns the entity image.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetPosition>
<tr><td class=doctop colspan=2>Method GetPosition:TPosition()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns the position type for this entity.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Init>
<tr><td class=doctop colspan=2>Method Init(id:String, image:TImage, posX:Float, posY:Float, imageFrame:Int = 0,  rotation:Float = 0, alpha:Float = 1.0, scaleX:Int = 1.0, scaleY:Int = 1.0) {hidden}</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Initializes entity basic settings.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Call this before adding the entity to the game.</td></tr>
</table>
<br>
<table class=doc width=100% cellspacing=3 id=TFixedTime>
<tr><td class=doctop colspan=2>Type TFixedTime</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Fixed time step and render tweening.</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TFixedTime_methods></a>Methods Summary</th></tr>
<tr><td class=docleft width=1%><a href=#GetDeltaTime>GetDeltaTime</a></td><td class=docright>
Returns update delta time (in millisecs)
</td></tr>
<tr><td class=docleft width=1%><a href=#GetTweening>GetTweening</a></td><td class=docright>
Calculates and returns the render tweening value.
</td></tr>
<tr><td class=docleft width=1%><a href=#Reset>Reset</a></td><td class=docright>
Resets the timer.
</td></tr>
<tr><td class=docleft width=1%><a href=#SetUpdateFrequency>SetUpdateFrequency</a></td><td class=docright>
Sets the update rate for this timer.
</td></tr>
<tr><td class=docleft width=1%><a href=#TimeStepNeeded>TimeStepNeeded</a></td><td class=docright>
Returns true when an update is needed.
</td></tr>
<tr><td class=docleft width=1%><a href=#Update>Update</a></td><td class=docright>
Adds time passed since last update to the accumulator.
</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetDeltaTime>
<tr><td class=doctop colspan=2>Method GetDeltaTime:Int()</td></tr>
<tr><td class=docleft width=1%>Returns</td><td class=docright>Double.</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns update delta time (in millisecs)</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetTweening>
<tr><td class=doctop colspan=2>Method GetTweening:Double()</td></tr>
<tr><td class=docleft width=1%>Returns</td><td class=docright>Double.</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Calculates and returns the render tweening value.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Reset>
<tr><td class=doctop colspan=2>Method Reset()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Resets the timer.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Sets the time to current millisecs value and resets the accumulator.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SetUpdateFrequency>
<tr><td class=doctop colspan=2>Method SetUpdateFrequency(f:Int)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets the update rate for this timer.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>The update rate is converted to millisecs.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=TimeStepNeeded>
<tr><td class=doctop colspan=2>Method TimeStepNeeded:Int()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns true when an update is needed.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>This is called from the TGame.Run() method.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Update>
<tr><td class=doctop colspan=2>Method Update:Int()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Adds time passed since last update to the accumulator.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>This is called from the TGame.Run() method.</td></tr>
</table>
<br>
<table class=doc width=100% cellspacing=3 id=TGame>
<tr><td class=doctop colspan=2>Type TGame</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>State based game.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Add user setup code in the StartUp() method when extending this type.</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TGame_methods></a>Methods Summary</th></tr>
<tr><td class=docleft width=1%><a href=#AddEntity>AddEntity</a></td><td class=docright>
Adds entity to game.
</td></tr>
<tr><td class=docleft width=1%><a href=#AddGameState>AddGameState</a></td><td class=docright>
Adds state to this game with specified id.
</td></tr>
<tr><td class=docleft width=1%><a href=#CallLuaFunction>CallLuaFunction</a></td><td class=docright>
Calls a lua function.
</td></tr>
<tr><td class=docleft width=1%><a href=#CallLuaFunctionWithObject>CallLuaFunctionWithObject</a></td><td class=docright>
Calls lua function and passes specified object as argument.
</td></tr>
<tr><td class=docleft width=1%><a href=#CleanUp>CleanUp</a></td><td class=docright>
User hook to perform game shut down logic.
</td></tr>
<tr><td class=docleft width=1%><a href=#EnterState>EnterState</a></td><td class=docright>
Enters a gamestate with the provided transitions.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetGameHeight>GetGameHeight</a></td><td class=docright>
Returns game height, or physical height if no virtual resolution has been used.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetGameStateByID>GetGameStateByID</a></td><td class=docright>
Returns game state by specified ID.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetGameWidth>GetGameWidth</a></td><td class=docright>
Returns game width, or physical width if no virtual resolution has been used.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetLuaFloat>GetLuaFloat</a></td><td class=docright>
Returns lua global as float.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetLUAInt>GetLUAInt</a></td><td class=docright>
Returns lua global as Int.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetLUAString>GetLUAString</a></td><td class=docright>
Returns lua string global.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetTitle>GetTitle</a></td><td class=docright>
Returns game name.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetVSync>GetVSync</a></td><td class=docright>
Returns vertical blank flag.
</td></tr>
<tr><td class=docleft width=1%><a href=#IsPaused>IsPaused</a></td><td class=docright>
Returns true when the engine is paused.
</td></tr>
<tr><td class=docleft width=1%><a href=#PlaySound>PlaySound</a></td><td class=docright>
Plays a previously loaded sound on passed channel or random channel if none provided.
</td></tr>
<tr><td class=docleft width=1%><a href=#RemoveEntity>RemoveEntity</a></td><td class=docright>
Removes entity from game.
</td></tr>
<tr><td class=docleft width=1%><a href=#RenderText>RenderText</a></td><td class=docright>
Renders text in the current game font.
</td></tr>
<tr><td class=docleft width=1%><a href=#RequestStop>RequestStop</a></td><td class=docright>
Calling this will stop the game on the next update.
</td></tr>
<tr><td class=docleft width=1%><a href=#SetGameResolution>SetGameResolution</a></td><td class=docright>
Sets game resolution.
</td></tr>
<tr><td class=docleft width=1%><a href=#SetPaused>SetPaused</a></td><td class=docright>
Sets engine pause mode.
</td></tr>
<tr><td class=docleft width=1%><a href=#SetPauseKey>SetPauseKey</a></td><td class=docright>
Changes the default engine pause key.
</td></tr>
<tr><td class=docleft width=1%><a href=#SetPhysicalResolution>SetPhysicalResolution</a></td><td class=docright>
Sets physical screen resolution and graphics driver.
</td></tr>
<tr><td class=docleft width=1%><a href=#SetTitle>SetTitle</a></td><td class=docright>
Sets game name.
</td></tr>
<tr><td class=docleft width=1%><a href=#SetUpdateFrequency>SetUpdateFrequency</a></td><td class=docright>
Sets game update frequency, in times per second.
</td></tr>
<tr><td class=docleft width=1%><a href=#SetVSync>SetVSync</a></td><td class=docright>
Sets vertical blank flag.
</td></tr>
<tr><td class=docleft width=1%><a href=#Start>Start</a></td><td class=docright>
Sets up and starts the game.
</td></tr>
<tr><td class=docleft width=1%><a href=#Startup>Startup</a></td><td class=docright>
User hook to perform game startup logic.
</td></tr>
<tr><td class=docleft width=1%><a href=#StopAllSound>StopAllSound</a></td><td class=docright>
Stops all sound channels.
</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=AddEntity>
<tr><td class=doctop colspan=2>Method AddEntity(e:TEntity, scriptFileName:String)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Adds entity to game.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>TEntity.SetScript() Also calls the EntityAdded() lua function.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=AddGameState>
<tr><td class=doctop colspan=2>Method AddGameState(gameState:TState, id:Int)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Adds state to this game with specified id.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>First state added is the default state.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=CallLuaFunction>
<tr><td class=doctop colspan=2>Method CallLuaFunction(functionName:String)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Calls a lua function.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>No arguments.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=CallLuaFunctionWithObject>
<tr><td class=doctop colspan=2>Method CallLuaFunctionWithObject(functionName:String, obj:Object)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Calls lua function and passes specified object as argument.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=CleanUp>
<tr><td class=doctop colspan=2>Method CleanUp()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>User hook to perform game shut down logic.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>This method is called when the game stops.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=EnterState>
<tr><td class=doctop colspan=2>Method EnterState(id:Int, enter:TTransition = Null, leave:TTransition = Null)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Enters a gamestate with the provided transitions.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetGameHeight>
<tr><td class=doctop colspan=2>Method GetGameHeight:Int()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns game height, or physical height if no virtual resolution has been used.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetGameStateByID>
<tr><td class=doctop colspan=2>Method GetGameStateByID:TState(id:Int)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns game state by specified ID.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetGameWidth>
<tr><td class=doctop colspan=2>Method GetGameWidth:Int()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns game width, or physical width if no virtual resolution has been used.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetLuaFloat>
<tr><td class=doctop colspan=2>Method GetLuaFloat:Float(globalName:String)</td></tr>
<tr><td class=docleft width=1%>Returns</td><td class=docright>Float.</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns lua global as float.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetLUAInt>
<tr><td class=doctop colspan=2>Method GetLUAInt:Int(globalName:String)</td></tr>
<tr><td class=docleft width=1%>Returns</td><td class=docright>Int.</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns lua global as Int.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetLUAString>
<tr><td class=doctop colspan=2>Method GetLUAString:String(globalName:String)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns lua string global.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetTitle>
<tr><td class=doctop colspan=2>Method GetTitle:String()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns game name.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetVSync>
<tr><td class=doctop colspan=2>Method GetVSync:Int()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns vertical blank flag.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=IsPaused>
<tr><td class=doctop colspan=2>Method IsPaused:Int()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns true when the engine is paused.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=PlaySound>
<tr><td class=doctop colspan=2>Method PlaySound:TChannel(s:TSound, c:TChannel, volume:Float)</td></tr>
<tr><td class=docleft width=1%>Returns</td><td class=docright>Used channel.</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Plays a previously loaded sound on passed channel or random channel if none provided.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=RemoveEntity>
<tr><td class=doctop colspan=2>Method RemoveEntity(e:TEntity)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Removes entity from game.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Also calls the Removed() function in the lua script.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=RenderText>
<tr><td class=doctop colspan=2>Method RenderText(text:String, xpos:Int, ypos:Int, centered:Int = False, shadow:Int = False, shadowDistance:Float = 1.0)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Renders text in the current game font.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Text can be centered, with a shadow.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=RequestStop>
<tr><td class=doctop colspan=2>Method RequestStop()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Calling this will stop the game on the next update.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SetGameResolution>
<tr><td class=doctop colspan=2>Method SetGameResolution(w:Int, h:Int)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets game resolution.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>This is a virtual resolution, independant from physical resolution, which is set with Game.SetPhysicalResolution()</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SetPaused>
<tr><td class=doctop colspan=2>Method SetPaused(bool:Int)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets engine pause mode.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SetPauseKey>
<tr><td class=doctop colspan=2>Method SetPauseKey(keycode:Int)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Changes the default engine pause key.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SetPhysicalResolution>
<tr><td class=doctop colspan=2>Method SetPhysicalResolution(w:Int, h:Int, depth:Int = 0, herz:Int = 60, openGL:Int = False)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets physical screen resolution and graphics driver.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>No depth or a depth of 0 means a Windowed game.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SetTitle>
<tr><td class=doctop colspan=2>Method SetTitle(newName:String)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets game name.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SetUpdateFrequency>
<tr><td class=doctop colspan=2>Method SetUpdateFrequency(frequency:Int)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets game update frequency, in times per second.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SetVSync>
<tr><td class=doctop colspan=2>Method SetVSync(bool:Int)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets vertical blank flag.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Start>
<tr><td class=doctop colspan=2>Method Start()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets up and starts the game.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Additional user setup code can be added to the StartUp() method.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Startup>
<tr><td class=doctop colspan=2>Method Startup()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>User hook to perform game startup logic.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>This method is called when the game starts.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=StopAllSound>
<tr><td class=doctop colspan=2>Method StopAllSound()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Stops all sound channels.</td></tr>
</table>
<br>
<table class=doc width=100% cellspacing=3 id=TLua>
<tr><td class=doctop colspan=2>Type TLua {expose static noclass hidefields}</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Game2d interface for Lua scripts.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>The methods in this type are exposed to Lua as global functions.</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TLua_methods></a>Methods Summary</th></tr>
<tr><td class=docleft width=1%><a href=#GetResourceImage>GetResourceImage</a></td><td class=docright>
Returns image from resource manager.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetResourceSound>GetResourceSound</a></td><td class=docright>
Returns sound from resource manager.
</td></tr>
<tr><td class=docleft width=1%><a href=#lKeyDown>lKeyDown</a></td><td class=docright>
Returns keycode of currently held key.
</td></tr>
<tr><td class=docleft width=1%><a href=#lKeyHit>lKeyHit</a></td><td class=docright>
Exposed as KeyHit.
</td></tr>
<tr><td class=docleft width=1%><a href=#PlaySound>PlaySound</a></td><td class=docright>
Plays sound from the resource manager.
</td></tr>
<tr><td class=docleft width=1%><a href=#StopAudioChannel>StopAudioChannel</a></td><td class=docright>
Stops passed audio channel.
</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetResourceImage>
<tr><td class=doctop colspan=2>Method GetResourceImage:TImage(imageName:String, groupName:String = "default")</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns image from resource manager.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetResourceSound>
<tr><td class=doctop colspan=2>Method GetResourceSound:TSound(soundName:String, groupName:String = "default")</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns sound from resource manager.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=lKeyDown>
<tr><td class=doctop colspan=2>Method lKeyDown:Int(k:Int) {rename</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns keycode of currently held key.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=lKeyHit>
<tr><td class=doctop colspan=2>Method lKeyHit:Int(k:Int) {rename</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Exposed as KeyHit.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Does not return a bool, so check in lua if returned value > 0.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=PlaySound>
<tr><td class=doctop colspan=2>Method PlaySound:TChannel(soundName:String, groupName:String = "",  volume:Float, channel:TChannel)</td></tr>
<tr><td class=docleft width=1%>Returns</td><td class=docright>Used audio channel.</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Plays sound from the resource manager.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=StopAudioChannel>
<tr><td class=doctop colspan=2>Method StopAudioChannel(c:TChannel)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Stops passed audio channel.</td></tr>
</table>
<br>
<table class=doc width=100% cellspacing=3 id=TPosition>
<tr><td class=doctop colspan=2>Type TPosition {expose hidefields}</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Entity position type.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Documented methods are also exposed to Lua.</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TPosition_methods></a>Methods Summary</th></tr>
<tr><td class=docleft width=1%><a href=#Add>Add</a></td><td class=docright>
Adds passed values to this position.
</td></tr>
<tr><td class=docleft width=1%><a href=#AddV>AddV</a></td><td class=docright>
Adds passed vector to this position.
</td></tr>
<tr><td class=docleft width=1%><a href=#AddX>AddX</a></td><td class=docright>
Adds passed value to X component of this position.
</td></tr>
<tr><td class=docleft width=1%><a href=#AddY>AddY</a></td><td class=docright>
Adds passed value to Y component of this position.
</td></tr>
<tr><td class=docleft width=1%><a href=#Changed>Changed</a></td><td class=docright>
Returns true if this position has changed since last update.
</td></tr>
<tr><td class=docleft width=1%><a href=#Get>Get</a></td><td class=docright>
Returns position as a vector.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetDistanceTo>GetDistanceTo</a></td><td class=docright>
Returns length of vector from this position to passed position.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetRenderX>GetRenderX</a></td><td class=docright>
Returns X component of render position.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetRenderY>GetRenderY</a></td><td class=docright>
Returns Y component of render position.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetX>GetX</a></td><td class=docright>
Returns X component of this position.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetY>GetY</a></td><td class=docright>
Returns Y component of this position.
</td></tr>
<tr><td class=docleft width=1%><a href=#Reset>Reset</a></td><td class=docright>
Resets this position to passed coordinates.
</td></tr>
<tr><td class=docleft width=1%><a href=#Set>Set</a></td><td class=docright>
Sets position to passed coordinates.
</td></tr>
<tr><td class=docleft width=1%><a href=#SetX>SetX</a></td><td class=docright>
Sets X component of this position.
</td></tr>
<tr><td class=docleft width=1%><a href=#SetY>SetY</a></td><td class=docright>
Sets Y component of this position.
</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Add>
<tr><td class=doctop colspan=2>Method Add(x:Float, y:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Adds passed values to this position.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=AddV>
<tr><td class=doctop colspan=2>Method AddV(v:TVector2D)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Adds passed vector to this position.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=AddX>
<tr><td class=doctop colspan=2>Method AddX(x:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Adds passed value to X component of this position.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=AddY>
<tr><td class=doctop colspan=2>Method AddY(y:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Adds passed value to Y component of this position.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Changed>
<tr><td class=doctop colspan=2>Method Changed:Int()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns true if this position has changed since last update.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Get>
<tr><td class=doctop colspan=2>Method Get:TVector2D()</td></tr>
<tr><td class=docleft width=1%>Returns</td><td class=docright>TVector2D.</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns position as a vector.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetDistanceTo>
<tr><td class=doctop colspan=2>Method GetDistanceTo:Float(p:TPosition)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns length of vector from this position to passed position.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetRenderX>
<tr><td class=doctop colspan=2>Method GetRenderX:Float()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns X component of render position.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Use this value to render, and after calling Interpolate()
Interpolate is called automatically by TGame.Render()</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetRenderY>
<tr><td class=doctop colspan=2>Method GetRenderY:Float()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns Y component of render position.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Use this value to render, and after calling Interpolate()
Interpolate is called automatically by TGame.Render()</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetX>
<tr><td class=doctop colspan=2>Method GetX:Float()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns X component of this position.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetY>
<tr><td class=doctop colspan=2>Method GetY:Float()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns Y component of this position.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Reset>
<tr><td class=doctop colspan=2>Method Reset(x:Float, y:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Resets this position to passed coordinates.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Also resets previous and render position.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Set>
<tr><td class=doctop colspan=2>Method Set(x:Float, y:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets position to passed coordinates.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Does not reset previous and render position.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SetX>
<tr><td class=doctop colspan=2>Method SetX(x:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets X component of this position.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SetY>
<tr><td class=doctop colspan=2>Method SetY(y:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets Y component of this position.</td></tr>
</table>
<br>
<table class=doc width=100% cellspacing=3 id=TRect>
<tr><td class=doctop colspan=2>Type TRect</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>2D rectangle.</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TRect_methods></a>Methods Summary</th></tr>
<tr><td class=docleft width=1%><a href=#GetDimension>GetDimension</a></td><td class=docright>
Returns dimension of this rect.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetHeight>GetHeight</a></td><td class=docright>
Returns height of this rect.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetPosition>GetPosition</a></td><td class=docright>
Returns position (topleft) of this rect.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetWidth>GetWidth</a></td><td class=docright>
Returns width of this rect.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetX>GetX</a></td><td class=docright>
Returns topleft corner X value.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetY>GetY</a></td><td class=docright>
Returns topleft conrer Y value.
</td></tr>
<tr><td class=docleft width=1%><a href=#Inside>Inside</a></td><td class=docright>
Returns true when specified rect is completely inside this rect.
</td></tr>
<tr><td class=docleft width=1%><a href=#OverLappedBy>OverLappedBy</a></td><td class=docright>
Returns true when specified rect overlaps this rect.
</td></tr>
<tr><td class=docleft width=1%><a href=#PointInside>PointInside</a></td><td class=docright>
Returns true if passed vector point is inside this rect.
</td></tr>
<tr><td class=docleft width=1%><a href=#SetDimension>SetDimension</a></td><td class=docright>
Sets dimensions (width and height).
</td></tr>
<tr><td class=docleft width=1%><a href=#SetPosition>SetPosition</a></td><td class=docright>
Sets the position (topleft) of this rect.
</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TRect_functions></a>Functions Summary</th></tr>
<tr><td class=docleft width=1%><a href=#Create>Create</a></td><td class=docright>
Creates a new rect with passed origin and dimension.
</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetDimension>
<tr><td class=doctop colspan=2>Method GetDimension:TVector2D()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns dimension of this rect.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetHeight>
<tr><td class=doctop colspan=2>Method GetHeight:Float()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns height of this rect.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetPosition>
<tr><td class=doctop colspan=2>Method GetPosition:TVector2D()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns position (topleft) of this rect.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetWidth>
<tr><td class=doctop colspan=2>Method GetWidth:Float()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns width of this rect.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetX>
<tr><td class=doctop colspan=2>Method GetX:Float()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns topleft corner X value.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetY>
<tr><td class=doctop colspan=2>Method GetY:Float()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns topleft conrer Y value.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Inside>
<tr><td class=doctop colspan=2>Method Inside:Int(r:TRect)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns true when specified rect is completely inside this rect.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=OverLappedBy>
<tr><td class=doctop colspan=2>Method OverLappedBy:Int(r:TRect)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns true when specified rect overlaps this rect.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=PointInside>
<tr><td class=doctop colspan=2>Method PointInside:Int(p:TVector2D)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns true if passed vector point is inside this rect.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SetDimension>
<tr><td class=doctop colspan=2>Method SetDimension(w:Float, h:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets dimensions (width and height).</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SetPosition>
<tr><td class=doctop colspan=2>Method SetPosition(x:Float, y:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets the position (topleft) of this rect.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Create>
<tr><td class=doctop colspan=2>Function Create:TRect(x:Float, y:Float, w:Float, h:Float, centered:Int = False)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Creates a new rect with passed origin and dimension.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Centers the rect on passed position when requested.</td></tr>
</table>
<br>
<table class=doc width=100% cellspacing=3 id=TRenderState>
<tr><td class=doctop colspan=2>Type TRenderState' {expose hidefields}</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Render state push to and pop from a stack.</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TRenderState_functions></a>Functions Summary</th></tr>
<tr><td class=docleft width=1%><a href=#ClearStack>ClearStack</a></td><td class=docright>
Clears the render state stack.
</td></tr>
<tr><td class=docleft width=1%><a href=#Pop>Pop</a></td><td class=docright>
Removes renderstate from top of stack and applies it.
</td></tr>
<tr><td class=docleft width=1%><a href=#Push>Push</a></td><td class=docright>
Pushes current renderstate to the stack.
</td></tr>
<tr><td class=docleft width=1%><a href=#Reset>Reset</a></td><td class=docright>
Resets current render state.
</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=ClearStack>
<tr><td class=doctop colspan=2>Function ClearStack()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Clears the render state stack.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Pop>
<tr><td class=doctop colspan=2>Function Pop()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Removes renderstate from top of stack and applies it.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Push>
<tr><td class=doctop colspan=2>Function Push:TRenderState()</td></tr>
<tr><td class=docleft width=1%>Returns</td><td class=docright>TRenderState.</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Pushes current renderstate to the stack.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Reset>
<tr><td class=doctop colspan=2>Function Reset()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Resets current render state.</td></tr>
</table>
<br>
<table class=doc width=100% cellspacing=3 id=TResources>
<tr><td class=doctop colspan=2>Type TResources</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Manages resources.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>This manager is not instantiated.</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TResources_functions></a>Functions Summary</th></tr>
<tr><td class=docleft width=1%><a href=#AddGroup>AddGroup</a></td><td class=docright>
Adds a new group to the manager.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetGroup>GetGroup</a></td><td class=docright>
Retrieves a group from the manager.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetImage>GetImage</a></td><td class=docright>
Gets an image from the manager.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetObject>GetObject</a></td><td class=docright>
Gets an object from the manager.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetSound>GetSound</a></td><td class=docright>
Gets sound from the manager.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetString>GetString</a></td><td class=docright>
Gets a string from the manager.
</td></tr>
<tr><td class=docleft width=1%><a href=#StoreImage>StoreImage</a></td><td class=docright>
Stores image in the manager.
</td></tr>
<tr><td class=docleft width=1%><a href=#StoreObject>StoreObject</a></td><td class=docright>
Stores passed object in the manager, in specified group.
</td></tr>
<tr><td class=docleft width=1%><a href=#StoreSound>StoreSound</a></td><td class=docright>
Stores sound in the manager.
</td></tr>
<tr><td class=docleft width=1%><a href=#StoreString>StoreString</a></td><td class=docright>
Stores a string in the manager.
</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=AddGroup>
<tr><td class=doctop colspan=2>Function AddGroup:TMap(groupName:String)</td></tr>
<tr><td class=docleft width=1%>Returns</td><td class=docright>TMap.</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Adds a new group to the manager.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetGroup>
<tr><td class=doctop colspan=2>Function GetGroup:TMap(groupName:String)</td></tr>
<tr><td class=docleft width=1%>Returns</td><td class=docright>TMap.</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Retrieves a group from the manager.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetImage>
<tr><td class=doctop colspan=2>Function GetImage:TImage(imageName:String, groupName:String = "default")</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Gets an image from the manager.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>'default' group is used when none is specified.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetObject>
<tr><td class=doctop colspan=2>Function GetObject:Object(objectName:String, groupName:String = "default")</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Gets an object from the manager.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>'default' group is used when none is specified.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetSound>
<tr><td class=doctop colspan=2>Function GetSound:TSound(soundName:String, groupName:String = "default")</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Gets sound from the manager.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>'default' group is used when none is specified.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetString>
<tr><td class=doctop colspan=2>Function GetString:String(scriptName:String, groupName:String = "default")</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Gets a string from the manager.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>'default' group is used when none is specified.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=StoreImage>
<tr><td class=doctop colspan=2>Function StoreImage(image:TImage, imageName:String, groupName:String = "default")</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Stores image in the manager.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>'default' group is used when none is specified.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=StoreObject>
<tr><td class=doctop colspan=2>Function StoreObject(o:Object, objectName:String, groupName:String = "default")</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Stores passed object in the manager, in specified group.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>'default' group is used when none is specified.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=StoreSound>
<tr><td class=doctop colspan=2>Function StoreSound(sound:TSound, soundName:String, groupName:String = "default")</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Stores sound in the manager.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>'default' group is used when none is specified.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=StoreString>
<tr><td class=doctop colspan=2>Function StoreString(str:String, stringName:String, groupName:String = "default")</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Stores a string in the manager.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>'default' group is used when none is specified.</td></tr>
</table>
<br>
<table class=doc width=100% cellspacing=3 id=TState>
<tr><td class=doctop colspan=2>Type TState Abstract</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>A game2d state.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>A state is like a 'screen' or a 'mode'. Examples are a 'titlestate' or a 'play'state'.</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TState_methods></a>Methods Summary</th></tr>
<tr><td class=docleft width=1%><a href=#Enter>Enter</a></td><td class=docright>
User hook for code when entering this state.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetGame>GetGame</a></td><td class=docright>
Returns the game owning this state.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetId>GetId</a></td><td class=docright>
Returns the ID of this state.
</td></tr>
<tr><td class=docleft width=1%><a href=#Leave>Leave</a></td><td class=docright>
User hook for code when leaving this state.
</td></tr>
<tr><td class=docleft width=1%><a href=#PostRender>PostRender</a></td><td class=docright>
User hook for rendering after state rendering.
</td></tr>
<tr><td class=docleft width=1%><a href=#PostUpdate>PostUpdate</a></td><td class=docright>
User hook for update code after state updating.
</td></tr>
<tr><td class=docleft width=1%><a href=#PreRender>PreRender</a></td><td class=docright>
User hook for rendering before state rendering.
</td></tr>
<tr><td class=docleft width=1%><a href=#PreUpdate>PreUpdate</a></td><td class=docright>
User hook for update code before state updating.
</td></tr>
<tr><td class=docleft width=1%><a href=#Render>Render</a></td><td class=docright>
User hook for state render code.
</td></tr>
<tr><td class=docleft width=1%><a href=#Update>Update</a></td><td class=docright>
User hook for state update logic.
</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Enter>
<tr><td class=doctop colspan=2>Method Enter()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>User hook for code when entering this state.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetGame>
<tr><td class=doctop colspan=2>Method GetGame:TGame()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns the game owning this state.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetId>
<tr><td class=doctop colspan=2>Method GetId:Int()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns the ID of this state.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Leave>
<tr><td class=doctop colspan=2>Method Leave()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>User hook for code when leaving this state.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=PostRender>
<tr><td class=doctop colspan=2>Method PostRender(tween:Double)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>User hook for rendering after state rendering.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=PostUpdate>
<tr><td class=doctop colspan=2>Method PostUpdate(delta:Double)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>User hook for update code after state updating.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=PreRender>
<tr><td class=doctop colspan=2>Method PreRender(tween:Double)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>User hook for rendering before state rendering.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=PreUpdate>
<tr><td class=doctop colspan=2>Method PreUpdate(delta:Double)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>User hook for update code before state updating.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Render>
<tr><td class=doctop colspan=2>Method Render(tween:Double)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>User hook for state render code.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Update>
<tr><td class=doctop colspan=2>Method Update(delta:Double)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>User hook for state update logic.</td></tr>
</table>
<br>
<table class=doc width=100% cellspacing=3 id=TTransition>
<tr><td class=doctop colspan=2>Type TTransition Abstract</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Game state transition.</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TTransition_fields></a>Fields Summary</th></tr><tr><td colspan=2>
<a href=#_color>_color</a>
, 
<a href=#_transitionLength>_transitionLength</a>
</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TTransition_methods></a>Methods Summary</th></tr>
<tr><td class=docleft width=1%><a href=#Initialize>Initialize</a></td><td class=docright>
User hook to initialize effect.
</td></tr>
<tr><td class=docleft width=1%><a href=#IsComplete>IsComplete</a></td><td class=docright>
Returns true if the transition is complete.
</td></tr>
<tr><td class=docleft width=1%><a href=#Render>Render</a></td><td class=docright>
Render transition effect.
</td></tr>
<tr><td class=docleft width=1%><a href=#SetEffectColor>SetEffectColor</a></td><td class=docright>
Sets transition effect color.
</td></tr>
<tr><td class=docleft width=1%><a href=#SetLength>SetLength</a></td><td class=docright>
Sets transition effect length.
</td></tr>
<tr><td class=docleft width=1%><a href=#Update>Update</a></td><td class=docright>
Perform transition action.
</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=_color>
<tr><td class=doctop colspan=2>Field _color:TColor = TColor.Create(0,0,0,1.0)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Transition effect color and alpha.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=_transitionLength>
<tr><td class=doctop colspan=2>Field _transitionLength:Int = 1000</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Transition effect length.</td></tr>
<tr><td class=docleft width=1%>Information</td><td class=docright>Default length is one second.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Initialize>
<tr><td class=doctop colspan=2>Method Initialize() Abstract</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>User hook to initialize effect.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=IsComplete>
<tr><td class=doctop colspan=2>Method IsComplete:Int() Abstract</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns true if the transition is complete.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Render>
<tr><td class=doctop colspan=2>Method Render(g:TGame) Abstract</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Render transition effect.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SetEffectColor>
<tr><td class=doctop colspan=2>Method SetEffectColor(r:Int, g:Int, b:Int)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets transition effect color.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SetLength>
<tr><td class=doctop colspan=2>Method SetLength(seconds:Int)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets transition effect length.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Update>
<tr><td class=doctop colspan=2>Method Update(delta:Double) Abstract</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Perform transition action.</td></tr>
</table>
<br>
<table class=doc width=100% cellspacing=3 id=TTransitionEmpty>
<tr><td class=doctop colspan=2>Type TTransitionEmpty Extends TTransition</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>An empty gamestate transition.</td></tr>
</table>
<br>
<table class=doc width=100% cellspacing=3 id=TTransitionFadeIn>
<tr><td class=doctop colspan=2>Type TTransitionFadeIn Extends TTransition</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>A fade-in effect.</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TTransitionFadeIn_methods></a>Methods Summary</th></tr>
<tr><td class=docleft width=1%><a href=#Initialize>Initialize</a></td><td class=docright>
User hook to initialize effect.
</td></tr>
<tr><td class=docleft width=1%><a href=#IsComplete>IsComplete</a></td><td class=docright>
Returns true if the transition is complete.
</td></tr>
<tr><td class=docleft width=1%><a href=#Render>Render</a></td><td class=docright>
Render transition effect.
</td></tr>
<tr><td class=docleft width=1%><a href=#Update>Update</a></td><td class=docright>
Perform transition action.
</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Initialize>
<tr><td class=doctop colspan=2>Method Initialize()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>User hook to initialize effect.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=IsComplete>
<tr><td class=doctop colspan=2>Method IsComplete:Int()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns true if the transition is complete.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Render>
<tr><td class=doctop colspan=2>Method Render(g:TGame)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Render transition effect.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Update>
<tr><td class=doctop colspan=2>Method Update(delta:Double)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Perform transition action.</td></tr>
</table>
<br>
<table class=doc width=100% cellspacing=3 id=TTransitionFadeOut>
<tr><td class=doctop colspan=2>Type TTransitionFadeOut Extends TTransition</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>A slow fade-out effect.</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TTransitionFadeOut_methods></a>Methods Summary</th></tr>
<tr><td class=docleft width=1%><a href=#Initialize>Initialize</a></td><td class=docright>
Initialize effect.
</td></tr>
<tr><td class=docleft width=1%><a href=#IsComplete>IsComplete</a></td><td class=docright>
Returns true if the transition is complete.
</td></tr>
<tr><td class=docleft width=1%><a href=#Render>Render</a></td><td class=docright>
Render transition effect.
</td></tr>
<tr><td class=docleft width=1%><a href=#Update>Update</a></td><td class=docright>
Perform transition action.
</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Initialize>
<tr><td class=doctop colspan=2>Method Initialize()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Initialize effect.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=IsComplete>
<tr><td class=doctop colspan=2>Method IsComplete:Int()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns true if the transition is complete.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Render>
<tr><td class=doctop colspan=2>Method Render(g:TGame)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Render transition effect.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Update>
<tr><td class=doctop colspan=2>Method Update(delta:Double)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Perform transition action.</td></tr>
</table>
<br>
<table class=doc width=100% cellspacing=3 id=TVector2D>
<tr><td class=doctop colspan=2>Type TVector2D</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>A 2d vector class.</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TVector2D_methods></a>Methods Summary</th></tr>
<tr><td class=docleft width=1%><a href=#Add>Add</a></td><td class=docright>
Adds passed values to this vector.
</td></tr>
<tr><td class=docleft width=1%><a href=#AddV>AddV</a></td><td class=docright>
Adds passed vector to this vector.
</td></tr>
<tr><td class=docleft width=1%><a href=#AddX>AddX</a></td><td class=docright>
Add X component.
</td></tr>
<tr><td class=docleft width=1%><a href=#AddY>AddY</a></td><td class=docright>
Add Y component.
</td></tr>
<tr><td class=docleft width=1%><a href=#Clone>Clone</a></td><td class=docright>
Returns a clone of this vector.
</td></tr>
<tr><td class=docleft width=1%><a href=#Copy>Copy</a></td><td class=docright>
Copies the values from passed vector to this vector.
</td></tr>
<tr><td class=docleft width=1%><a href=#Distance>Distance</a></td><td class=docright>
Returns the distance between this and passed vector.
</td></tr>
<tr><td class=docleft width=1%><a href=#Divide>Divide</a></td><td class=docright>
Divides this vector by passed value.
</td></tr>
<tr><td class=docleft width=1%><a href=#DivideV>DivideV</a></td><td class=docright>
Divides this vector by passed vector.
</td></tr>
<tr><td class=docleft width=1%><a href=#Dot>Dot</a></td><td class=docright>
Returns the dot product of this and passed vector.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetLength>GetLength</a></td><td class=docright>
Returns the length of this vector.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetRotation>GetRotation</a></td><td class=docright>
Returns angle of vector rotation.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetX>GetX</a></td><td class=docright>
Returns X component.
</td></tr>
<tr><td class=docleft width=1%><a href=#GetY>GetY</a></td><td class=docright>
Returns Y component.
</td></tr>
<tr><td class=docleft width=1%><a href=#IsSame>IsSame</a></td><td class=docright>
Returns true if the values in both vectors are the same.
</td></tr>
<tr><td class=docleft width=1%><a href=#Multiply>Multiply</a></td><td class=docright>
Multiplies this vector by passed value.
</td></tr>
<tr><td class=docleft width=1%><a href=#MultiplyV>MultiplyV</a></td><td class=docright>
Multiplies this vector by passed vector.
</td></tr>
<tr><td class=docleft width=1%><a href=#Normalise>Normalise</a></td><td class=docright>
Make this vector length = 1.0.
</td></tr>
<tr><td class=docleft width=1%><a href=#Rotate>Rotate</a></td><td class=docright>
Rotates this vector with passed amount, origin = 0,0.
</td></tr>
<tr><td class=docleft width=1%><a href=#RotateV>RotateV</a></td><td class=docright>
Rotates this vector with passed amount around passed vector.
</td></tr>
<tr><td class=docleft width=1%><a href=#Set>Set</a></td><td class=docright>
Sets this vector to passed values.
</td></tr>
<tr><td class=docleft width=1%><a href=#SetX>SetX</a></td><td class=docright>
Set X component.
</td></tr>
<tr><td class=docleft width=1%><a href=#SetY>SetY</a></td><td class=docright>
Set Y component.
</td></tr>
<tr><td class=docleft width=1%><a href=#Substract>Substract</a></td><td class=docright>
Substracts passed values from this vector.
</td></tr>
<tr><td class=docleft width=1%><a href=#SubstractV>SubstractV</a></td><td class=docright>
Substracts passed vector from this vector.
</td></tr>
<tr><td class=docleft width=1%><a href=#Swap>Swap</a></td><td class=docright>
Swaps values between this and passed vector.
</td></tr>
</table>
<table class=doc width=90% align=center><tr ><th class=doctop colspan=2 align=left><a name=TVector2D_functions></a>Functions Summary</th></tr>
<tr><td class=docleft width=1%><a href=#Create>Create</a></td><td class=docright>
Creates a new vector with passed values.
</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Add>
<tr><td class=doctop colspan=2>Method Add(x:Float, y:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Adds passed values to this vector.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=AddV>
<tr><td class=doctop colspan=2>Method AddV(v:TVector2D)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Adds passed vector to this vector.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=AddX>
<tr><td class=doctop colspan=2>Method AddX(x:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Add X component.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=AddY>
<tr><td class=doctop colspan=2>Method AddY(y:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Add Y component.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Clone>
<tr><td class=doctop colspan=2>Method Clone:TVector2D()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns a clone of this vector.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Copy>
<tr><td class=doctop colspan=2>Method Copy(v:TVector2D)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Copies the values from passed vector to this vector.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Distance>
<tr><td class=doctop colspan=2>Method Distance:Float(v:TVector2D)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns the distance between this and passed vector.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Divide>
<tr><td class=doctop colspan=2>Method Divide(f:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Divides this vector by passed value.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=DivideV>
<tr><td class=doctop colspan=2>Method DivideV(v:TVector2D)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Divides this vector by passed vector.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Dot>
<tr><td class=doctop colspan=2>Method Dot:Float(v:TVector2D)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns the dot product of this and passed vector.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetLength>
<tr><td class=doctop colspan=2>Method GetLength:Float()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns the length of this vector.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetRotation>
<tr><td class=doctop colspan=2>Method GetRotation:Float()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns angle of vector rotation.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetX>
<tr><td class=doctop colspan=2>Method GetX:Float()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns X component.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=GetY>
<tr><td class=doctop colspan=2>Method GetY:Float()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns Y component.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=IsSame>
<tr><td class=doctop colspan=2>Method IsSame:Int(v2:TVector2D)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Returns true if the values in both vectors are the same.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Multiply>
<tr><td class=doctop colspan=2>Method Multiply(f:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Multiplies this vector by passed value.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=MultiplyV>
<tr><td class=doctop colspan=2>Method MultiplyV(v:TVector2D)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Multiplies this vector by passed vector.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Normalise>
<tr><td class=doctop colspan=2>Method Normalise()</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Make this vector length = 1.0.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Rotate>
<tr><td class=doctop colspan=2>Method Rotate(theta:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Rotates this vector with passed amount, origin = 0,0.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=RotateV>
<tr><td class=doctop colspan=2>Method RotateV( theta:Float, v:TVector2D )</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Rotates this vector with passed amount around passed vector.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Set>
<tr><td class=doctop colspan=2>Method Set(x:Float, y:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Sets this vector to passed values.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SetX>
<tr><td class=doctop colspan=2>Method SetX(x:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Set X component.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SetY>
<tr><td class=doctop colspan=2>Method SetY(y:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Set Y component.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Substract>
<tr><td class=doctop colspan=2>Method Substract(x:Float, y:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Substracts passed values from this vector.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=SubstractV>
<tr><td class=doctop colspan=2>Method SubstractV(v:TVector2D)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Substracts passed vector from this vector.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Swap>
<tr><td class=doctop colspan=2>Method Swap(v:TVector2D)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Swaps values between this and passed vector.</td></tr>
</table>
<table class=doc width=100% cellspacing=3 id=Create>
<tr><td class=doctop colspan=2>Function Create:TVector2D(x:Float, y:Float)</td></tr>
<tr><td class=docleft width=1%>Description</td><td class=docright>Creates a new vector with passed values.</td></tr>
</table>
<br>
<h2 id=modinfo>Module Information</h2>
<table width=100%>
<tr><th width=1%>Version</th><td>0.1</td></tr>
<tr><th width=1%>License</th><td>MIT</td></tr>
<tr><th width=1%>Copyright</th><td>2013 Wiebo de Wit</td></tr>
<tr><th width=1%>History</th><td>0.1</td></tr>
</body></html>
